$primary-blue: #4c95e9;

.user-center {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  .user-container {
    width: 500px;
    max-width: 90vw;
    max-height: 80vh;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;

    .header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 20px 24px;
      border-bottom: 1px solid #f0f0f0;
      background: linear-gradient(135deg, $primary-blue 0%, #6ba6e8 100%);

      .title {
        font-size: 18px;
        font-weight: 600;
        color: #fff;

        span {
          margin-left: 8px;
        }
      }

      .close-btn {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.2);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s ease;
        color: #fff;

        &:hover {
          background: rgba(255, 255, 255, 0.3);
          transform: scale(1.1);
        }
      }
    }

    .content {
      flex: 1;
      padding: 24px;
      overflow-y: auto;

      .user-form {
        .avatar-section {
          display: flex;
          flex-direction: column;
          align-items: center;
          margin-bottom: 32px;
          padding-bottom: 24px;
          border-bottom: 1px solid #f0f0f0;

          .avatar-container {
            position: relative;
            margin-bottom: 12px;

            .ant-avatar {
              border: 4px solid #fff;
              box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            }

            .avatar-upload {
              position: absolute;
              bottom: 0;
              right: 0;
              width: 36px;
              height: 36px;
              background: $primary-blue;
              border-radius: 50%;
              display: flex;
              align-items: center;
              justify-content: center;
              cursor: pointer;
              color: #fff;
              box-shadow: 0 2px 8px rgba(76, 149, 233, 0.3);
              transition: all 0.2s ease;

              &:hover {
                transform: scale(1.1);
                box-shadow: 0 4px 12px rgba(76, 149, 233, 0.4);
              }
            }
          }

          .avatar-tip {
            font-size: 12px;
            color: #999;
            text-align: center;
          }
        }

        .info-section {
          .info-item {
            margin-bottom: 20px;

            .info-label {
              display: flex;
              align-items: center;
              margin-bottom: 8px;
              font-weight: 500;
              color: #333;

              .anticon {
                margin-right: 8px;
                color: $primary-blue;
                font-size: 16px;
              }
            }

            .info-value {
              padding: 12px 16px;
              background: #f8f9fa;
              border-radius: 6px;
              color: #666;
              font-size: 14px;
              border: 1px solid #e9ecef;

              &.readonly {
                background: #f1f3f4;
                color: #999;
                cursor: not-allowed;
              }
            }

            .ant-form-item {
              margin-bottom: 0;

              .ant-input,
              .ant-input-password {
                border-radius: 6px;
                border: 1px solid #d9d9d9;
                transition: all 0.2s ease;

                &:focus,
                &:hover {
                  border-color: $primary-blue;
                  box-shadow: 0 0 0 2px rgba(76, 149, 233, 0.1);
                }
              }
            }
          }
        }

        .action-section {
          margin-top: 32px;
          padding-top: 24px;
          border-top: 1px solid #f0f0f0;

          .action-buttons {
            display: flex;
            gap: 12px;
            justify-content: flex-end;

            .cancel-btn {
              border-radius: 6px;
              height: 40px;
              padding: 0 20px;
              border: 1px solid #d9d9d9;
              color: #666;

              &:hover {
                border-color: $primary-blue;
                color: $primary-blue;
              }
            }

            .save-btn {
              border-radius: 6px;
              height: 40px;
              padding: 0 20px;
              background: $primary-blue;
              border-color: $primary-blue;

              &:hover {
                background: #3a7bd5;
                border-color: #3a7bd5;
              }
            }
          }

          .edit-btn {
            width: 100%;
            height: 40px;
            border-radius: 6px;
            background: $primary-blue;
            border-color: $primary-blue;
            font-weight: 500;

            &:hover {
              background: #3a7bd5;
              border-color: #3a7bd5;
            }

            .anticon {
              margin-right: 8px;
            }
          }
        }
      }
    }
  }
}

// 响应式设计
@media (max-width: 768px) {
  .user-center {
    .user-container {
      width: 95vw;
      max-height: 90vh;

      .content {
        padding: 16px;

        .user-form {
          .avatar-section {
            .avatar-container {
              .ant-avatar {
                width: 80px !important;
                height: 80px !important;
              }

              .avatar-upload {
                width: 28px;
                height: 28px;
              }
            }
          }

          .info-section {
            .info-item {
              margin-bottom: 16px;
            }
          }
        }
      }
    }
  }
}